package com.zhao.context;

import com.zhao.state.ILiftState;

public class Context {

    private ILiftState currentState;

    public ILiftState getCurrentState() {
        return currentState;
    }

    public void setCurrentState(ILiftState currentState) {
        this.currentState = currentState;
        currentState.setContext(this);
    }

    public void openDoor() {
        currentState.openDoor();
    }

    public void closeDoor() {
        currentState.closeDoor();
    }

    public void startLift() {
        currentState.startLift();
    }

    public void stopLift() {
        currentState.stopLift();
    }
}
